package cn.josh.utill;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

public class OrderCode 
{
	public static String getOrderCode()
	{
		SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmm");
		Random random = new Random();
		int rd = random.nextInt(999);
		String code = "OP-" + df.format(new Date()) + rd;
		return code;
	}
	
	public static void main(String[] args)
	{
		System.out.println(getOrderCode());
	}
}
